<?php

session_start();

							$name="localhost";
							$root="root";
							$pass="";
							$database="iicdashboard";
							$connection=@mysql_connect("$name","$root","$pass");
							mysql_set_charset("utf8", $connection);
							$db=mysql_select_db("$database");

	$studentemail=$_POST['stu_email'];
	$studentpass=$_POST['stu_pass'];
	$str="SELECT * FROM iic_stuent where stu_Email='$studentemail' AND stu_pass='$studentpass'";
	$result=mysql_query($str);
	
	$row=mysql_fetch_array($result);
	if($row > 1){
			$_SESSION['login']=true;
			$_SESSION['stu_name']=$row['stu_name'];
			$_SESSION['stu_Email']=$row['stu_Email'];
			{
			include("main.php");
			}
	}
		
		if(isset($_SESSION['login'])){
	
		include("main.php");
		
	}else {
			include("login.html");
		  }	
		

?>